package entity

// FileEntity 文件entity
type FileEntity struct {
	CommonEntity
	Filename *string `gorm:"size:100"`
	Size     *int64  `gorm:"size:128"`
	FromIP   *string `gorm:"size:100"`
}

// TableName tablename
func (a *FileEntity) TableName() string {
	return "file"
}

// FindByID find by id
func (a *FileEntity) FindByID(id string) {
	CheckDbRes(GetDb().Where("id = ?", id).First(a))
}
